/** 
* 文 件 名:IRecordManageLogic.java
* Copyright (C) 2007-2012:杭州希禾信息技术有限公司 版权所有 
* 创 建 人:林洪波
* 日    期:2012-3-12 下午3:32:43
* 修 改 人: 
* 日   期:
* 修改描述:
* 描   述:TODO
*/
package net.seehealth.healthpad.business.recordmanage.service;

import java.util.List;

import net.seehealth.healthpad.application.template.OneRecorder;
import net.seehealth.healthpad.application.template.TwoRecorder;
import net.seehealth.healthpad.model.healthmanage.ChineseMedicineAssement;
import net.seehealth.healthpad.model.healthmanage.DepartmentModel;
import net.seehealth.healthpad.model.healthmanage.ElectronicMedicalRecordModel;
import net.seehealth.healthpad.model.healthmanage.HealthAbnor;
import net.seehealth.healthpad.model.healthmanage.HealthReportModel;
import net.seehealth.healthpad.model.healthmanage.ModeldetailModel;
import net.seehealth.healthpad.model.healthmanage.PharmacyRecordModel;
import net.seehealth.healthpad.model.healthmanage.PsychologicalAssessmentModel;
import net.seehealth.healthpad.model.healthmanage.RecordItemModel;


/**
 * @className IRecordManageLogic
 * @author 林洪波
 * @description 记录管理业务接口定义
 * @date 2012-3-12 下午3:32:43
 */
/**
 * @className IRecordManageLogic
 * @author Administrator
 * @description TODO
 * @date 2012-4-13 下午3:37:08
 */
public interface IRecordManageLogic{
	
	
	/**
	  * @description:从网络查询最新体检报告（包含体检小项）和其它体检报告主详情(不包含体检小项)
	  * @param userinfo_famialy_pk:userinfo_famialy_pk表主键
	  * @return 
	  * @throws Exception 
	  * @author 林洪波
	  * @date 2012-4-12 上午10:22:18
	  */
	public List<HealthReportModel> queryNewHealthReportAndOtherReportDetailFromWeb(int userinfo_famialy_pk) throws Exception;
	
	
	/**
	  * @description:从网络根据体检报告ID查询体检报告,并且保存覆盖最新数据
	  * @param 
	  * @return 
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-17 下午5:36:21
	  */
	public HealthReportModel queryHealthReportByReportIdFromWebAndSaveLocal(int health_report_pk) throws Exception;
	
	
	
	/**
	  * @description:从本地根据体检报告ID查询体检报告
	  * @param 
	  * @return 
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-17 下午5:39:25
	  */
	public HealthReportModel queryHealthReportByReportIdFromLocal(int health_report_pk) throws Exception;
	
	
	
	/**
	  * @description:从本地查询个人所有体检报告
	  * @param userinfo_famialy_pk:userinfo_famialy_pk表主键
	  * @return 
	  * @throws Exception   
	  * @author 林洪波
	  * @date 2012-4-12 上午10:22:18
	  */
	public List<HealthReportModel> queryAllHealthReportModelFromLocal(int userinfo_famialy_pk) throws Exception;
	
	
	
	/**
	  * @description:从网络查询个人最新一次的疾病评估
	  * @param userinfo_famialy_pk:USERINFO_FAMIALY表主键
	  * @return 
	  * @throws Exception   
	  * @author 林洪波
	  * @date 2012-4-12 下午5:06:29
	  */
	public List<ModeldetailModel> queryNewModeldetailFromWeb(int userinfo_famialy_pk) throws Exception;
	
	/**
	  * @description:添加最新一次评估到本地
	  * @param modelDetails:评估详情数据
	  * @return 
	  * @throws Exception   
	  * @author 林洪波
	  * @date 2012-4-12 下午5:06:29
	  */
	public  boolean addNewModelDetailToLocal(List<ModeldetailModel> modelDetails) throws Exception;
	
	
	
	
	/**
	  * @description:从本地查询最新一次评估
	  * @param 
	  * @return 返回本地评估列表
	  * @throws Exception   
	  * @author 林洪波
	  * @date 2012-4-17 下午1:53:03
	  */
	public List<ModeldetailModel> queryNewModelDetailFromLocal(int userinfo_famialy_pk) throws Exception;
	
	
	/**
	  * @description:从本地获取体检异常详情
	  * @param abnorId：HEALTH_ABNOR主键
	  * @return 
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午1:08:01
	  */
	public HealthAbnor queryHealthAbnorByIdFromLocal(int abnorId) throws Exception;
	
	
	
	/**
	  * @description:从综合平台获取体检异常详情
	  * @param abnorId：HEALTH_ABNOR主键
	  * @return 
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午3:37:12
	  */
	public HealthAbnor queryHealthAbnorByIdFromWeb(int abnorId) throws Exception;
	
	
	/**
	  * @description:从网络获取该数字型体检项目历年的数据(只有是数字型的体检小项才有对比数据)
	  * @param itemId:RECORD_ITEM主键
	  * @return 体检报告与体检小项对应的数据载体的集合
	  * @throws Exception   
	  * @author 林洪波
	  * @date 2012-4-13 下午1:14:32
	  */
	public List<TwoRecorder<HealthReportModel,RecordItemModel>> queryRecordItemCompareByIdFromWeb(int itemId) throws Exception;
   
	
	
	/**
	  * @description:从网络获取历年体检报告对比
	  * @param ids:HEALTH_REPORT体检报告主键数组
	  * @return 返回体检报告对应科室的数据载体的集合，其中科室包含对比条目的集合
	  * @throws Exception   
	  * @author 林洪波
	  * @date 2012-4-13 下午2:09:58
	  */
	public List<TwoRecorder<HealthReportModel,List<DepartmentModel>>> queryHealthReportCompareByIdsFromWeb(Integer[] ids) throws Exception;
	
	
	/**
	  * @description:从网络获取所有就医记录
	  * @param famialyPrimaryKey:USERINFO_FAMIALY家庭信息主键
	  * @return 
	  * @throws Exception   
	  * @author 林洪波
	  * @date 2012-4-13 下午2:27:46
	  */
	public List<ElectronicMedicalRecordModel> queryALLMedicalRecordFromWeb(int famialyPrimaryKey) throws Exception;
	
	
	
	/**
	  * @description:从本地获取就医记录详情
	  * @param ELECTRONIC_MEDICAL primaryKey：就医记录主键
	  * @return 
	  * @throws Exception   
	  * @author 林洪波
	  * @date 2012-4-13 下午2:36:39
	  */
	public ElectronicMedicalRecordModel queryByIdFromLocal(int primaryKey) throws Exception;
	
	
	
	/**
	  * @description:添加就医记录数据到综合平台
	  * @param 就医记录数据对象
	  * @return 返回的是综合平台就医记录主键 ELECTRONIC_MEDICAL：ELECTRONIC_MEDICAL_ID 
	  * @throws Exception   
	  * @author 林洪波
	  * @date 2012-4-13 下午2:44:17
	  */
	public int addElectronicMedicalRecordToWeb(ElectronicMedicalRecordModel ElectronicMedical) throws Exception;
	
	
	
	
	/**
	  * @description:添加就医记录数据到本地
	  * @param 就医记录数据对象
	  * @return 返回的ELECTRONIC_MEDICAL主键：ID
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午2:49:32
	  */
	public int addElectronicMedicalRecordToLocal(ElectronicMedicalRecordModel ElectronicMedical) throws Exception;
	
	
	
	/**
	  * @description:修改综合平台电子病历
	  * @param 就医记录对象
	  * @return 返回修改是否成功
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午2:57:58
	  */
	public boolean modifElectronicMedicalToWeb(ElectronicMedicalRecordModel ElectronicMedical) throws Exception;
	
	
	
	/**
	  * @description:修改本子电子病历
	  * @param 电子病历数据对象
	  * @return 返回修改是否成功
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午3:09:19
	  */
	public boolean modifElectronicMedicalToLoacl(ElectronicMedicalRecordModel ElectronicMedical) throws Exception;
	
	
	
	/**
	  * @description:添加用药记录到综合平台
	  * @param 用药记录数据对象
	  * @return 返回综合平台用药记录主键对应PHARMACY_TASK:PHARMACY_ID
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午3:18:26
	  */
	public int addPharmacyRecordModelToWeb(PharmacyRecordModel pharmacyRecord) throws Exception;
	
	
	/**
	  * @description:添加用药记录到本地
	  * @param 用药记录数据对象
	  * @return 返回本地PHARMACY_TASK主键ID
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午3:23:10
	  */
	public int addPharmacyRecordModelToLocal(PharmacyRecordModel pharmacyRecord) throws Exception;
	
	
	
	/**
	  * @description:修改综合平台用药记录对象
	  * @param :用药记录数据对象
	  * @return 返回修改成功或者失败
	  * @throws Exception  
	  * @author TODO
	  * @date 2012-4-13 下午3:27:33
	  */
	public boolean modifPharmacyRecordModelToWeb(PharmacyRecordModel pharmacyRecord) throws Exception;
	
	
	
	/**
	  * @description：修改用药记录到本地
	  * @param 用药记录数据对象
	  * @return 返回修改成功或者失败
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午3:29:01
	  */
	public boolean modifPharmacyRecordModelToLocal(PharmacyRecordModel pharmacyRecord) throws Exception;
	
	
	
	/**
	  * @description:获取综合平台用药记录数据对象
	  * @param PHARMACY_TASK:ID
	  * @return 返回用药记录数据对象
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午3:47:31
	  */
	public PharmacyRecordModel queryPharmacyRecordByIdFromWeb(int pharmacyPrimayKey) throws Exception;
	
	
	/**
	  * @description:获取本地用药记录数据对象
	  * @param PHARMACY_TASK:ID
	  * @return 返回用药记录数据数据
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午5:11:11
	  */
	public PharmacyRecordModel queryPharmacyRecordByIdFromLocal(int pharmacyPrimayKey) throws Exception;
	
	/**
	  * @description:从网络查询所有评估对比数据
	  * @param userId:USERINFO_FAMIALY表主键
	  * @return 返回评估对比数据
	  * @throws Exception   
	  * @author 林洪波
	  * @date 2012-4-12 下午5:06:29
	  */
	public List<OneRecorder<List<ModeldetailModel>>> queryALLModelDetailCompareFromWeb(int userId) throws Exception;
	
	
	/**
	  * @description:从综合平台查询该人该评估的历年数据
	  * @param userId:USERINFO_FAMIALY表主键,MODELEVAL表主键ID
	  * @return 
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午6:12:00
	  */
	public List<ModeldetailModel> querySingleModelDetailCompareByModelIdFromWeb(int userId,int modelId) throws Exception;
	
	
	
	/**
	  * @description:从综合平台查询个人最新两年心理评估数据
	  * @param userId:USERINFO_FAMIALY表主键
	  * @return 
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午7:07:37
	  */
	public TwoRecorder<PsychologicalAssessmentModel,PsychologicalAssessmentModel> queryTwoPsyFromWeb(int userId) throws Exception;
	
	/**
	  * @description:从本地查询个人最新两年心理评估数据
	  * @param userId:USERINFO_FAMIALY表主键
	  * @return 
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午7:07:37
	  */
	public TwoRecorder<PsychologicalAssessmentModel,PsychologicalAssessmentModel> queryTwoPsyFromLocal(int userId) throws Exception;
	
	
	
	/**
	  * @description:从综合平台查询个人最新两年中医体质评估数据
	  * @param userId:USERINFO_FAMIALY表主键
	  * @return 
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午7:07:37
	  */
	public TwoRecorder<ChineseMedicineAssement,ChineseMedicineAssement> queryTwoChiFromWeb(int userId) throws Exception;
	
	
	
	/**
	  * @description:从本地查询个人最新两年中医体质评估数据
	  * @param userId:USERINFO_FAMIALY表主键
	  * @return 
	  * @throws Exception   
	  * @author TODO
	  * @date 2012-4-13 下午7:07:37
	  */
	public TwoRecorder<ChineseMedicineAssement,ChineseMedicineAssement> queryTwoChiFromLocal(int userId) throws Exception;
	
	
	
}
